package com.iring.controller.admin;

import java.util.List;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.iring.controller.BaseController;
import com.iring.vo.common.CallRateVO;
import com.iring.vo.common.RateVO;

/**
 * 费率信息Controller
 *
 * @author wanggan
 */
@RestController
@RequestMapping(value = "/admin/callrate", produces = { "application/json;charset=UTF-8" })
public class CallRateController extends BaseController {

    /**
     * 获取所有国家费率信息列表
     *
     * @return 显示所有国家的费率
     */
    @RequestMapping(value = "/list-all-country-callrate", method = RequestMethod.POST)
    public List<CallRateVO> listAllCountryCallrate() {
        return callRateService.listAllCountryCallrate();
    }

    /**
     * 获取单个国家的费率信息
     *
     * @param rateVO
     *            {@link RateVO}
     * @return 显示某个国家的所有费率详情信息
     */
    @RequestMapping(value = "/list-single-country-callrate-detail", method = RequestMethod.POST)
    public List<CallRateVO> listSingleCountryCallrateDeatil(@RequestBody RateVO rateVO) {
        return callRateService.listSingleCountryCallrateDeatil(rateVO);
    }

}
